<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
</style>
<script type="text/javascript">
    $(function() {
        CKEDITOR.replace( 'workSummaryAdd_content',{
            filebrowserImageUploadUrl: '${ctxPath}/ckeditor/uploadImg',
            language : 'zh-cn'
        });

        $('#workSummaryAddForm').form({
            url : '${path}/workSummary/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg(result.msg);
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                  } else {
                    var form = $('#workSummaryAddForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false" >
    <div data-options="region:'center',border:false" style="overflow-x:hidden;overflow-y: auto;padding: 3px;" >
        <form id="workSummaryAddForm" method="post">
            <input type="hidden" name="userid" value='<shiro:principal property = "id"/>'/>
            <table class="grid">
                <tr>
                      <td>标题</td>
                      <td colspan="3">
                        <input name='name'   type='text' placeholder='请输入标题' class='easyui-text-2 span2 easyui-validatebox' style="width: 90%" data-options="required:true">
                     </td>
                  </tr> <tr>
                    <td>类型</td>
                    <td colspan="3">
                        <select name="type" class="easyui-text-2 easyui-validatebox" data-options="required:true">
                            <option value="">请选择</option>
                            <option value="0">日总结</option>
                            <option value="1" selected>周总结</option>
                            <option value="2">月总结</option>
                            <option value="3">季度总结</option>
                            <option value="4">年度总结</option>

                        </select>
                    </td>
                  </tr>
                <tr>
                    <td>内容</td>
                    <td colspan="3">
                        <textarea name='content' id='workSummaryAdd_content' rows="10" cols="80"></textarea>
                    </td>
                </tr>
                <tr>
                     <td>审批人</td>
                      <td colspan="3">
                          <input type="hidden" name="commentators" id="workSummaryAdd_commentators"/>
                          <input type="text"  class="easyui-text-2" id="workSummaryAdd_commentators_disp" readonly="readonly"  placeholder="请选择" style="width: 60%"/>
                          <a href="javascript:void(0)" onclick="selectUser(true,'workSummaryAdd_commentators','workSummaryAdd_commentators_disp')" class="easyui-linkbutton">选择</a>
                     </td>
                  </tr>
                <tr>
                    <td>抄送人</td>
                    <td colspan="3">
                        <input type="hidden" name="useridCcs" id="workSummaryAdd_useridCcs"/>
                        <input type="text"  class="easyui-text-2" id="workSummaryAdd_useridCcs_disp" readonly="readonly"  placeholder="请选择" style="width: 60%"/>
                        <a href="javascript:void(0)" onclick="selectUser(true,'workSummaryAdd_useridCcs','workSummaryAdd_useridCcs_disp')" class="easyui-linkbutton">选择</a>
                    </td>
                </tr>
                <tr>
                     <td>附件</td>
                      <td colspan="3">
                          <input name='attachIds' id="workSummaryAdd_attachfile_input"  type="hidden"/>
                          <div id="workSummaryAdd_attachfile_input_disp"></div>
                          <a onclick="attachUpload('workSummaryAdd_attachfile_input','workSummaryAdd_attachfile_input_disp');" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'fi-plus icon-green'">增加附件</a>
                    </td>
            </tr>
            </table>
        </form>
    </div>
</div>